using Avanzis.QueryBuilder;

namespace Avanzis.QueryObjects.Tests
{
    [ActiveRecord("ClubGameStats")]
    public class ClubGameStats : StatsObject
    { 
        private string coachCode;

        [Property]
        public string CoachCode
        {
            get { return coachCode; }
            set { coachCode = value; }
        }

        public void Load(string seasonCode, int gameCode, string clubCode)
        {
            SearchFiltersCollection filters = new SearchFiltersCollection();
            filters.Add("SeasonCode", SqlOperator.Equals, seasonCode, ExpressionType.Primitive);
            filters.Add("GameCode", SqlOperator.Equals, gameCode);
            filters.Add("ClubCode", SqlOperator.Equals, clubCode, ExpressionType.Primitive);

            this.Load(filters);
        }
    }
}
